Parameters
Name | Type | Direction | Verbalization | Default Value |
---|---|---|---|---|
sudoku | rr.sudoku.shared.model.Sudoku | INOUT | the sudoku |
Variable Sets
-
Name Type Verbalization Initial Value redoFlag boolean redo flag false
Rule Artifacts
-
-
-
Definition:definitions
set ' cell1_candidate1 ' to a candidate cell value ;
set ' cell1_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the col of this candidate cell value is the col of cell1_candidate1 ;
set ' cell2_candidate1 ' to a candidate cell value
where the block of this candidate cell value is the block of cell1_candidate1
and the value of this candidate cell value is the value of cell1_candidate1 ;
set ' cell2_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell2_candidate1
and the col of this candidate cell value is the col of cell2_candidate1
and the value of this candidate cell value is the value of cell1_candidate2 ;
set ' otherCandidate ' to a candidate cell value
where the block of this candidate cell value is the block of cell1_candidate1
and the value of this candidate cell value is the value of cell1_candidate1 ;
if
the number of candidate cell values
where the row of each candidate cell value is the row of cell1_candidate1
and the col of each candidate cell value is the col of cell1_candidate1 , equals 2
and the number of candidate cell values
where the row of each candidate cell value is the row of cell2_candidate1
and the col of each candidate cell value is the col of cell2_candidate1 , equals 2
then
print "***Rule Naked Pair in block : Removing " + the string representation of otherCandidate + " based on " + the string representation of cell1_candidate1 + " " + the string representation of cell2_candidate2 ;
add "Rule - naked pair: Removing " + the value of otherCandidate + " from block " + the block of otherCandidate to the messages of 'the sudoku' ;
retract otherCandidate ;
set 'redo flag' to true ;Documentation:naked subset rule: When 2 candidates are possible in a certain set of 2 cells all in the same block, and no other candidates are possible in those cells, then those 2 candidates are not possible elsewhere in that same block.Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder complex rules Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority -10 Project sudoku-rules Status New Tags Version 1.1 -
Definition:definitions
set ' cell1_candidate1 ' to a candidate cell value ;
set ' cell1_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the col of this candidate cell value is the col of cell1_candidate1 ;
set ' cell1_candidate3 ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the col of this candidate cell value is the col of cell1_candidate1 ;
set ' cell2_candidate1 ' to a candidate cell value
where the block of this candidate cell value is the block of cell1_candidate1
and the value of this candidate cell value is the value of cell1_candidate1 ;
set ' cell2_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell2_candidate1
and the col of this candidate cell value is the col of cell2_candidate1
and the value of this candidate cell value is the value of cell1_candidate2 ;
set ' cell2_candidate3 ' to a candidate cell value
where the row of this candidate cell value is the row of cell2_candidate1
and the col of this candidate cell value is the col of cell2_candidate1
and the value of this candidate cell value is the value of cell1_candidate3 ;
set ' cell3_candidate1 ' to a candidate cell value
where the block of this candidate cell value is the block of cell1_candidate1
and the value of this candidate cell value is the value of cell1_candidate1 ;
set ' cell3_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell2_candidate1
and the col of this candidate cell value is the col of cell3_candidate1
and the value of this candidate cell value is the value of cell1_candidate2 ;
set ' cell3_candidate3 ' to a candidate cell value
where the row of this candidate cell value is the row of cell2_candidate1
and the col of this candidate cell value is the col of cell3_candidate1
and the value of this candidate cell value is the value of cell1_candidate3 ;
set ' otherCandidate ' to a candidate cell value
where the block of this candidate cell value is the block of cell1_candidate1
and the value of this candidate cell value is the value of cell1_candidate1 ;
if
the number of candidate cell values
where the row of each candidate cell value is the row of cell1_candidate1
and the col of each candidate cell value is the col of cell1_candidate1 , equals 3
and the number of candidate cell values
where the row of each candidate cell value is the row of cell2_candidate1
and the col of each candidate cell value is the col of cell2_candidate1 , equals 3
and the number of candidate cell values
where the row of each candidate cell value is the row of cell3_candidate1
and the col of each candidate cell value is the col of cell3_candidate1 , equals 3
then
print "***Rule Naked Trio in block : Removing " + the string representation of otherCandidate + " based on " + the string representation of cell1_candidate1 + " " + the string representation of cell2_candidate2 + " " + the string representation of cell2_candidate3 ;
add "Rule - naked trio: Removing " + the value of otherCandidate + " from block " + the block of otherCandidate to the messages of 'the sudoku' ;
retract otherCandidate ;
set 'redo flag' to true ;Documentation:naked subset rule: When 3 candidates are possible in a certain set of 3 cells all in the same block, and no other candidates are possible in those cells, then those 3 candidates are not possible elsewhere in that same block.Properties:Active True Categories Created By rtsAdmin Created On 4/23/12 5:53 PM Effective Date Expiration Date Folder complex rules Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority -10 Project sudoku-rules Status New Tags Version 1.0 -
Definition:definitions
set ' cell1_candidate1 ' to a candidate cell value ;
set ' cell1_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the col of this candidate cell value is the col of cell1_candidate1 ;
set ' cell2_candidate1 ' to a candidate cell value
where the col of this candidate cell value is the col of cell1_candidate1
and the value of this candidate cell value is the value of cell1_candidate1 ;
set ' cell2_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell2_candidate1
and the col of this candidate cell value is the col of cell2_candidate1
and the value of this candidate cell value is the value of cell1_candidate2 ;
set ' otherCandidate ' to a candidate cell value
where the col of this candidate cell value is the col of cell1_candidate1
and ( the value of this candidate cell value is the value of cell1_candidate1 ) ;
if
the number of candidate cell values
where the row of each candidate cell value is the row of cell1_candidate1
and the col of each candidate cell value is the col of cell1_candidate1 , equals 2
and the number of candidate cell values
where the row of each candidate cell value is the row of cell2_candidate1
and the col of each candidate cell value is the col of cell2_candidate1 , equals 2
then
print "***Rule Naked Pair in col : Removing " + the string representation of otherCandidate + " based on " + the string representation of cell1_candidate1 + " " + the string representation of cell2_candidate2 ;
add "Rule - naked pair: Removing " + the value of otherCandidate + " from col " + the col of otherCandidate to the messages of 'the sudoku' ;
retract otherCandidate ;
set 'redo flag' to true ;Documentation:naked subset rule: When 2 candidates are possible in a certain set of 2 cells all in the same column, and no other candidates are possible in those cells, then those 2 candidates are not possible elsewhere in that same column.Properties:Active True Categories Created By rtsAdmin Created On 4/23/12 5:53 PM Effective Date Expiration Date Folder complex rules Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority -10 Project sudoku-rules Status New Tags Version 1.0 -
Definition:definitions
set ' cell1_candidate1 ' to a candidate cell value ;
set ' cell1_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the col of this candidate cell value is the col of cell1_candidate1 ;
set ' cell2_candidate1 ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the value of this candidate cell value is the value of cell1_candidate1 ;
set ' cell2_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell2_candidate1
and the col of this candidate cell value is the col of cell2_candidate1
and the value of this candidate cell value is the value of cell1_candidate2 ;
set ' otherCandidate ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the value of this candidate cell value is the value of cell1_candidate1 ;
if
the number of candidate cell values
where the row of each candidate cell value is the row of cell1_candidate1
and the col of each candidate cell value is the col of cell1_candidate1 , equals 2
and the number of candidate cell values
where the row of each candidate cell value is the row of cell2_candidate1
and the col of each candidate cell value is the col of cell2_candidate1 , equals 2
then
print "***Rule Naked Pair in row : Removing " + the string representation of otherCandidate + " based on " + the string representation of cell1_candidate1 + " " + the string representation of cell2_candidate2 ;
add "Rule - naked pair: Removing " + the value of otherCandidate + " from row " + the row of otherCandidate to the messages of 'the sudoku' ;
retract otherCandidate ;
set 'redo flag' to true ;Documentation:naked subset rule: When 2 candidates are possible in a certain set of 2 cells all in the same row, and no other candidates are possible in those cells, then those 2 candidates are not possible elsewhere in that same row.Properties:Active True Categories Created By rtsAdmin Created On 4/23/12 5:53 PM Effective Date Expiration Date Folder complex rules Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority -10 Project sudoku-rules Status New Tags Version 1.0 -
Definition:definitions
set ' cell1_candidate1 ' to a candidate cell value ;
set ' cell1_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the col of this candidate cell value is the col of cell1_candidate1 ;
set ' cell2_candidate1 ' to a candidate cell value
where the block of this candidate cell value is the block of cell1_candidate1
and the value of this candidate cell value is the value of cell1_candidate1 ;
set ' cell2_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell2_candidate1
and the col of this candidate cell value is the col of cell2_candidate1
and the value of this candidate cell value is the value of cell1_candidate2 ;
set ' otherCandidate ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the col of this candidate cell value is the col of cell1_candidate1 ;
if
the number of candidate cell values
where the block of each candidate cell value is the block of cell1_candidate1
and the value of each candidate cell value is the value of cell1_candidate1 , equals 2
and the number of candidate cell values
where the block of each candidate cell value is the block of cell1_candidate2
and the value of each candidate cell value is the value of cell1_candidate2 , equals 2
then
print "***Rule Hidden Pair in block : Removing " + the string representation of otherCandidate + " based on " + the string representation of cell1_candidate1 + " " + the string representation of cell2_candidate2 ;
add "Rule - hidden pair: Removing " + the value of otherCandidate + " from block " + the block of otherCandidate to the messages of 'the sudoku' ;
retract otherCandidate ;
set 'redo flag' to true ;Documentation:hidden subset rule: When 2 candidates are possible in a certain set of 2 cells all in the same block, and those 2 candidates are not possible elsewhere in that same block, then no other candidates are possible in those cells.Properties:Active True Categories Created By rtsAdmin Created On 4/23/12 5:53 PM Effective Date Expiration Date Folder complex rules Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority -10 Project sudoku-rules Status New Tags Version 1.0 -
Definition:definitions
set ' cell1_candidate1 ' to a candidate cell value ;
set ' cell1_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the col of this candidate cell value is the col of cell1_candidate1 ;
set ' cell2_candidate1 ' to a candidate cell value
where the col of this candidate cell value is the col of cell1_candidate1
and the value of this candidate cell value is the value of cell1_candidate1 ;
set ' cell2_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell2_candidate1
and the col of this candidate cell value is the col of cell2_candidate1
and the value of this candidate cell value is the value of cell1_candidate2 ;
set ' otherCandidate ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the col of this candidate cell value is the col of cell1_candidate1 ;
if
the number of candidate cell values
where the col of each candidate cell value is the col of cell1_candidate1
and the value of each candidate cell value is the value of cell1_candidate1 , equals 2
and the number of candidate cell values
where the col of each candidate cell value is the col of cell1_candidate2
and the value of each candidate cell value is the value of cell1_candidate2 , equals 2
then
print "***Rule Hidden Pair in col : Removing " + the string representation of otherCandidate + " based on " + the string representation of cell1_candidate1 + " " + the string representation of cell2_candidate2 ;
add "Rule - hidden pair: Removing " + the value of otherCandidate + " from col " + the col of otherCandidate to the messages of 'the sudoku' ;
retract otherCandidate ;
set 'redo flag' to true ;Documentation:hidden subset rule: When 2 candidates are possible in a certain set of 2 cells all in the same column, and those 2 candidates are not possible elsewhere in that same column, then no other candidates are possible in those cells.Properties:Active True Categories Created By rtsAdmin Created On 4/23/12 5:53 PM Effective Date Expiration Date Folder complex rules Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority -10 Project sudoku-rules Status New Tags Version 1.0 -
Definition:definitions
set ' cell1_candidate1 ' to a candidate cell value ;
set ' cell1_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the col of this candidate cell value is the col of cell1_candidate1 ;
set ' cell2_candidate1 ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the value of this candidate cell value is the value of cell1_candidate1 ;
set ' cell2_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell2_candidate1
and the col of this candidate cell value is the col of cell2_candidate1
and the value of this candidate cell value is the value of cell1_candidate2 ;
set ' otherCandidate ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the col of this candidate cell value is the col of cell1_candidate1 ;
if
the number of candidate cell values
where the row of each candidate cell value is the row of cell1_candidate1
and the value of each candidate cell value is the value of cell1_candidate1 , equals 2
and the number of candidate cell values
where the row of each candidate cell value is the row of cell1_candidate2
and the value of each candidate cell value is the value of cell1_candidate2 , equals 2
then
print "***Rule Hidden Pair in row : Removing " + the string representation of otherCandidate + " based on " + the string representation of cell1_candidate1 + " " + the string representation of cell2_candidate2 ;
add "Rule - hidden pair: Removing " + the value of otherCandidate + " from row " + the row of otherCandidate to the messages of 'the sudoku' ;
retract otherCandidate ;
set 'redo flag' to true ;Documentation:hidden subset rule: When 2 candidates are possible in a certain set of 2 cells all in the same row, and those 2 candidates are not possible elsewhere in that same row, then no other candidates are possible in those cells.Properties:Active True Categories Created By rtsAdmin Created On 4/23/12 5:53 PM Effective Date Expiration Date Folder complex rules Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority -10 Project sudoku-rules Status New Tags Version 1.0 -
Definition:definitions
set ' cell1_candidate1 ' to a candidate cell value ;
set ' cell1_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the col of this candidate cell value is the col of cell1_candidate1 ;
set ' cell1_candidate3 ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the col of this candidate cell value is the col of cell1_candidate1 ;
set ' cell2_candidate1 ' to a candidate cell value
where the block of this candidate cell value is the block of cell1_candidate1
and the value of this candidate cell value is the value of cell1_candidate1 ;
set ' cell2_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell2_candidate1
and the col of this candidate cell value is the col of cell2_candidate1
and the value of this candidate cell value is the value of cell1_candidate2 ;
set ' cell2_candidate3 ' to a candidate cell value
where the row of this candidate cell value is the row of cell2_candidate1
and the col of this candidate cell value is the col of cell2_candidate1
and the value of this candidate cell value is the value of cell1_candidate3 ;
set ' cell3_candidate1 ' to a candidate cell value
where the block of this candidate cell value is the block of cell1_candidate1
and the value of this candidate cell value is the value of cell1_candidate1 ;
set ' cell3_candidate2 ' to a candidate cell value
where the row of this candidate cell value is the row of cell3_candidate1
and the col of this candidate cell value is the col of cell3_candidate1
and the value of this candidate cell value is the value of cell1_candidate2 ;
set ' cell3_candidate3 ' to a candidate cell value
where the row of this candidate cell value is the row of cell3_candidate1
and the col of this candidate cell value is the col of cell3_candidate1
and the value of this candidate cell value is the value of cell1_candidate3 ;
set ' otherCandidate ' to a candidate cell value
where the row of this candidate cell value is the row of cell1_candidate1
and the col of this candidate cell value is the col of cell1_candidate1 ;
if
the number of candidate cell values
where the block of each candidate cell value is the block of cell1_candidate1
and the value of each candidate cell value is the value of cell1_candidate1 , equals 3
and the number of candidate cell values
where the block of each candidate cell value is the block of cell1_candidate2
and the value of each candidate cell value is the value of cell1_candidate2 , equals 3
and the number of candidate cell values
where the block of each candidate cell value is the block of cell1_candidate3
and the value of each candidate cell value is the value of cell1_candidate3 , equals 3
then
print "***Rule Hidden Trio in block : Removing " + the string representation of otherCandidate + " based on " + the string representation of cell1_candidate1 + " " + the string representation of cell2_candidate2 ;
add "Rule - hidden trio: Removing " + the value of otherCandidate + " from block " + the block of otherCandidate to the messages of 'the sudoku' ;
retract otherCandidate ;
set 'redo flag' to true ;Documentation:hidden subset rule: When 3 candidates are possible in a certain set of 3 cells all in the same block, and those 3 candidates are not possible elsewhere in that same block, then no other candidates are possible in those cells.Properties:Active True Categories Created By rtsAdmin Created On 4/23/12 5:53 PM Effective Date Expiration Date Folder complex rules Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority -10 Project sudoku-rules Status New Tags Version 1.0
-
-
-
Definition:definitions
set ' rowNum ' to a number in { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } ;
set ' colNum ' to a number in { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } ;
if
there is no resolved cell value
where the row of this resolved cell value is rowNum
and the col of this resolved cell value is colNum ,
then
insert object : create an open cell for row rowNum and column colNum ;Documentation:Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder guess Group Last Changed By rtsAdmin Last Changed On 4/13/12 10:26 AM Locale English (United States) Overridden Rules Priority Project sudoku-rules Status New Tags Version 1.0 -
Definition:definitions
set ' openCell ' to a sudoku open cell
where the number of candidates of this sudoku open cell is at least 1 ;
if
the most promising cell of 'the sudoku' is null
and there is no sudoku open cell
where the number of candidates of this sudoku open cell is less than the number of candidates of openCell ,
then
print "Most promising: " + the string representation of openCell ;
set the most promising cell of 'the sudoku' to openCell ;Documentation:Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder guess Group Last Changed By rtsAdmin Last Changed On 4/13/12 10:26 AM Locale English (United States) Overridden Rules Priority -10 Project sudoku-rules Status New Tags Version 1.0 -
Definition:definitions
set ' openCell ' to a sudoku open cell ;
if
it is not true that openCell has candidates
then
print "Dead end : No candidates for : " + the string representation of openCell ;
make it true that 'the sudoku' has no solution ;Documentation:Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder guess Group Last Changed By rtsAdmin Last Changed On 4/13/12 10:26 AM Locale English (United States) Overridden Rules Priority -10 Project sudoku-rules Status New Tags Version 1.0 -
Definition:definitions
set ' openCell ' to a sudoku open cell ;
set ' candidate ' to a candidate cell value
where the row of this candidate cell value is the row of openCell
and the col of this candidate cell value is the col of openCell ;
if
true
then
add the value of candidate to the candidates of openCell ;Documentation:Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder guess Group Last Changed By rtsAdmin Last Changed On 4/13/12 10:26 AM Locale English (United States) Overridden Rules Priority Project sudoku-rules Status New Tags Version 1.0
-
-
-
Definition:definitions
set ' resolvedCell ' to a resolved cell value ;
set ' candidateCell ' to a candidate cell value
where the row of this candidate cell value equals the row of resolvedCell
and the col of this candidate cell value equals the col of resolvedCell ;
then
retract candidateCell ;Documentation:Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder solve sudoku Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority 10 Project sudoku-rules Status New Tags Version 1.1 -
Definition:definitions
set ' resolvedCell ' to a resolved cell value ;
set ' candidateCell ' to a candidate cell value
where the block of this candidate cell value equals the block of resolvedCell
and the value of this candidate cell value equals the value of resolvedCell ;
then
print "Rule : Removing " + the value of candidateCell + " from block " + the block of candidateCell ;
retract candidateCell ;Documentation:Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder solve sudoku Group Last Changed By rtsAdmin Last Changed On 4/13/12 10:26 AM Locale English (United States) Overridden Rules Priority 10 Project sudoku-rules Status New Tags Version 1.0 -
Definition:definitions
set ' resolvedCell ' to a resolved cell value ;
set ' candidateCell ' to a candidate cell value
where the col of this candidate cell value equals the col of resolvedCell
and the value of this candidate cell value equals the value of resolvedCell ;
then
retract candidateCell ;Documentation:Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder solve sudoku Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority 10 Project sudoku-rules Status New Tags Version 1.1 -
Definition:definitions
set ' resolvedCell ' to a resolved cell value ;
set ' candidateCell ' to a candidate cell value
where the row of this candidate cell value equals the row of resolvedCell
and the value of this candidate cell value equals the value of resolvedCell ;
then
retract candidateCell ;Documentation:Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder solve sudoku Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority 10 Project sudoku-rules Status New Tags Version 1.1 -
Definition:definitions
set ' candidateCell1_val1 ' to a candidate cell value ;
set ' othercandidateCellValue ' to a candidate cell value
where the block of this candidate cell value is the block of candidateCell1_val1
and the col of this candidate cell value is not the col of candidateCell1_val1
and the value of this candidate cell value is the value of candidateCell1_val1 ;
if
the number of candidate cell values
where the col of each candidate cell value is the col of candidateCell1_val1
and the value of each candidate cell value is the value of candidateCell1_val1
and the block of each candidate cell value is not the block of candidateCell1_val1 , equals 0
then
print "***Rule : Locked cell (col) -- Removing " + the string representation of othercandidateCellValue + " based on " + the string representation of candidateCell1_val1 ;
add "Found locked cell value of " + the value of candidateCell1_val1 + " in col " + the col of candidateCell1_val1 + ". Removing this value from the other columns of block " + the block of othercandidateCellValue to the messages of 'the sudoku' ;
retract othercandidateCellValue ;Documentation:The locked candidate rule:
When a candidate is possible in a certain block and column, and it is not possible anywhere else in the same column, then it is also not possible anywhere else in the same block.
0 9 8 6 1 2 0 4 5
5 6 2 3 0 0 0 0 0
0 0 0 0 5 9 0 0 0
0 0 0 0 0 0 6 0 1
0 3 6 0 0 0 5 9 0
1 0 7 9 6 0 0 0 4
0 0 0 2 0 0 0 0 0
0 0 0 0 0 6 4 5 3
0 4 0 5 7 0 8 2 0
value of 4 has to be in col 4 of zone 5. Therfore, remove from other cols of zone 5.Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder solve sudoku Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority -10 Project sudoku-rules Status New Tags Version 1.1 -
Definition:definitions
set ' candidateCell1_val1 ' to a candidate cell value ;
set ' othercandidateCellValue ' to a candidate cell value
where the block of this candidate cell value is the block of candidateCell1_val1
and the row of this candidate cell value is not the row of candidateCell1_val1
and the value of this candidate cell value is the value of candidateCell1_val1 ;
if
the number of candidate cell values
where the row of each candidate cell value is the row of candidateCell1_val1
and the value of each candidate cell value is the value of candidateCell1_val1
and the block of each candidate cell value is not the block of candidateCell1_val1 , equals 0
then
print "***Rule : Locked cell (row) -- Removing " + the string representation of othercandidateCellValue + " based on " + the string representation of candidateCell1_val1 ;
add "Found locked cell value of " + the value of candidateCell1_val1 + " in row " + the row of candidateCell1_val1 + ". Removing this value from the other rows of block " + the block of othercandidateCellValue to the messages of 'the sudoku' ;
retract othercandidateCellValue ;Documentation:The locked candidate rule:
When a candidate is possible in a certain block and row, and it is not possible anywhere else in the same row then it is also not possible anywhere else in the same block.Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder solve sudoku Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority -10 Project sudoku-rules Status New Tags Version 1.1 -
Definition:definitions
set ' candidateCell1_val1 ' to a candidate cell value ;
set ' othercandidateCellValue ' to a candidate cell value
where the block of this candidate cell value is not the block of candidateCell1_val1
and the col of this candidate cell value is the col of candidateCell1_val1
and the value of this candidate cell value is the value of candidateCell1_val1 ;
if
the number of candidate cell values
where the col of each candidate cell value is not the col of candidateCell1_val1
and the value of each candidate cell value is the value of candidateCell1_val1
and the block of each candidate cell value is the block of candidateCell1_val1 , equals 0
then
print "***Rule : Locked cell (block-col) -- Removing " + the string representation of othercandidateCellValue + " based on " + the string representation of candidateCell1_val1 ;
add "Found locked cell value of " + the value of candidateCell1_val1 + " in block " + the block of candidateCell1_val1 + ". Removing this value from the col " + the col of othercandidateCellValue to the messages of 'the sudoku' ;
retract othercandidateCellValue ;Documentation:The locked candidate rule:
When a candidate is possible in a certain block and column, and it is not possible anywhere else in the same block, then it is also not possible anywhere else in the same column.
e.g.: If value of 1 is in a col of zone 9 and no other col of that zone has the value of 1, then remove the value of 1 from that col for cells NOT in zone 9.Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder solve sudoku Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority -10 Project sudoku-rules Status New Tags Version 1.1 -
Definition:definitions
set ' candidateCell1_val1 ' to a candidate cell value ;
set ' othercandidateCellValue ' to a candidate cell value
where the block of this candidate cell value is not the block of candidateCell1_val1
and the row of this candidate cell value is the row of candidateCell1_val1
and the value of this candidate cell value is the value of candidateCell1_val1 ;
if
the number of candidate cell values
where the row of each candidate cell value is not the row of candidateCell1_val1
and the value of each candidate cell value is the value of candidateCell1_val1
and the block of each candidate cell value is the block of candidateCell1_val1 , equals 0
then
print "***Rule : Locked cell (block-row) -- Removing " + the string representation of othercandidateCellValue + " based on " + the string representation of candidateCell1_val1 ;
add "Found locked cell value of " + the value of candidateCell1_val1 + " in block " + the block of candidateCell1_val1 + ". Removing this value from the row " + the row of othercandidateCellValue to the messages of 'the sudoku' ;
retract othercandidateCellValue ;Documentation:The locked candidate rule:
When a candidate is possible in a certain block and row, and it is not possible anywhere else in the same block, then it is also not possible anywhere else in the same row.
e.g. If value of 1 is in a row of zone 9 and no other rows of that zone, then remove the value of 1 from that row for cells NOT in zone 9.Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder solve sudoku Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority -10 Project sudoku-rules Status New Tags Version 1.1 -
Definition:definitions
set ' candidateCell ' to a candidate cell value ;
if
the number of candidate cell values
where the block of each candidate cell value equals the block of candidateCell
and the value of each candidate cell value equals the value of candidateCell , equals 1
then
print "Rule : Assigning single candidate value (in block) of " + the value of candidateCell + " to " + the position of candidateCell ;
retract candidateCell ;
insert object : create a resolved cell value using candidateCell , assignment type: ONLY_POSSIBLE_VAL_IN_BLOCK ;Documentation:The rule of singles requires:
When a candidate k is possible in only a single cell of a block, then that cell must be k.Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder solve sudoku Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority Project sudoku-rules Status New Tags Version 1.1 -
Definition:definitions
set ' candidateCell ' to a candidate cell value ;
if
the number of candidate cell values
where the row of each candidate cell value equals the row of candidateCell
and the col of each candidate cell value equals the col of candidateCell , equals 1
then
print "Rule : Assigning single candidate value " + the value of candidateCell + " to " + the position of candidateCell ;
retract candidateCell ;
insert object : create a resolved cell value using candidateCell , assignment type: ONLY_POSSIBLE_VAL_IN_CELL ;Documentation:The rule of "naked single": there is only one possible candidate k for a cell, then that cell must be k.Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder solve sudoku Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority Project sudoku-rules Status New Tags Version 1.1 -
Definition:definitions
set ' candidateCell ' to a candidate cell value ;
if
the number of candidate cell values
where the col of each candidate cell value equals the col of candidateCell
and the value of each candidate cell value equals the value of candidateCell , equals 1
then
print "Rule : Assigning single candidate value (in col) of " + the value of candidateCell + " to " + the position of candidateCell ;
retract candidateCell ;
insert object : create a resolved cell value using candidateCell , assignment type: ONLY_POSSIBLE_VAL_IN_COLUMN ;Documentation:The rule of singles require:
When a candidate k is possible in only a single cell of a column, then that cell must be k.Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder solve sudoku Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority Project sudoku-rules Status New Tags Version 1.1 -
Definition:definitions
set ' candidateCell ' to a candidate cell value ;
if
the number of candidate cell values
where the row of each candidate cell value equals the row of candidateCell
and the value of each candidate cell value equals the value of candidateCell , equals 1
then
print "Rule : Assigning single candidate value (in row) of " + the value of candidateCell + " to " + the position of candidateCell ;
retract candidateCell ;
insert object : create a resolved cell value using candidateCell , assignment type: ONLY_POSSIBLE_VAL_IN_ROW ;Documentation:The rule of singles requires:
When a candidate k is possible in only a single cell of a row, then that cell must be k.Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder solve sudoku Group Last Changed By rtsAdmin Last Changed On 4/23/12 5:53 PM Locale English (United States) Overridden Rules Priority Project sudoku-rules Status New Tags Version 1.1
-
-
-
Definition:definitions
set ' resolvedCell1 ' to a resolved cell value ;
set ' resolvedCell2 ' to a resolved cell value
where the block of this resolved cell value equals the block of resolvedCell1
and the value of this resolved cell value equals the value of resolvedCell1 ;
then
print "Block conflict in block " + the col of resolvedCell1 + " for value " + the value of resolvedCell2 ;
make it true that 'the sudoku' has no solution ;Documentation:Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder validate Group Last Changed By rtsAdmin Last Changed On 4/13/12 10:26 AM Locale English (United States) Overridden Rules Priority Project sudoku-rules Status New Tags Version 1.0 -
Definition:definitions
set ' resolvedCell1 ' to a resolved cell value ;
set ' resolvedCell2 ' to a resolved cell value
where the col of this resolved cell value equals the col of resolvedCell1
and the value of this resolved cell value equals the value of resolvedCell1 ;
then
print "Column conflict in col " + the col of resolvedCell1 + " for value " + the value of resolvedCell2 ;
make it true that 'the sudoku' has no solution ;Documentation:Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder validate Group Last Changed By rtsAdmin Last Changed On 4/13/12 10:26 AM Locale English (United States) Overridden Rules Priority Project sudoku-rules Status New Tags Version 1.0 -
Definition:definitions
set ' resolvedCell1 ' to a resolved cell value ;
set ' resolvedCell2 ' to a resolved cell value
where the row of this resolved cell value equals the row of resolvedCell1
and the value of this resolved cell value equals the value of resolvedCell1 ;
then
print "Row conflict in row " + the row of resolvedCell1 + " for value " + the value of resolvedCell2 ;
make it true that 'the sudoku' has no solution ;Documentation:Properties:Active True Categories Created By rtsAdmin Created On 4/13/12 10:26 AM Effective Date Expiration Date Folder validate Group Last Changed By rtsAdmin Last Changed On 4/13/12 10:26 AM Locale English (United States) Overridden Rules Priority Project sudoku-rules Status New Tags Version 1.0
-
-